/**
 * 
 */
package com.android.demolayoutpages;


import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.ListView;
import android.widget.TextView;

/**
 * @author INVEERA
 *
 */
public class CheckListActivity extends BaseActivity {
 
	private LayoutInflater layoutInflator;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView();
		setUpView();
	}

	private void setContentView() {
		

		LinearLayout layoutAppContents = (LinearLayout)findViewById(R.id.layout_app_contents);
	    layoutInflator = (LayoutInflater)CheckListActivity.this.
		getSystemService(CheckListActivity.this.LAYOUT_INFLATER_SERVICE);
		View contentsView = layoutInflator.inflate(R.layout.layout_checklist, null);
		contentsView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
		layoutAppContents.addView(contentsView);



	}

	private void setUpView() {
		

		ListView lvCheckList= (ListView)findViewById(R.id.lvCheckList);
		TextView tvSelectedTitle = (TextView)findViewById(R.id.txt_selectedTitle);
		tvSelectedTitle.setText("select a template");
		Button btnBack= (Button)findViewById(R.id.btn_left_nevigation);
		btnBack.setText("back");
	 	View headerCheckList = 	layoutInflator.inflate(R.layout.header_checklist, null);
		lvCheckList.addHeaderView(headerCheckList, null,false);
		lvCheckList.setAdapter(new ChekListAdapter(this));
		
	}

}
